﻿using System.Collections.Generic;
using System.Web.Mvc;
using System.Web.Routing;
using Quick.Common.Plugin;

namespace PortalWeb.Flight.Web
{
    public class FlightActivator : IActivator
    {
     
       
        public  string Name
        {
            get { return "Flight"; }
        }

        public void Initialize()
        {
            RouteConfig.RegisterRoutes(RouteTable.Routes);
        }

        public void Unload()
        {
            RouteConfig.RemoveRoutes(RouteTable.Routes);
        }

        public List<Extension> Extension()
        {
            return new List<Extension>()
            {
                new Extension
                {
                    Point = "MainMenu",
                    Items =
                        new List<dynamic>()
                        {
                            new {url = "Flight/Index?plugin=Flight", Text = "Flight", Order = 2},
                            new {url = "Flight/Index?plugin=Flight", Text = "FlightAdmin", Order = 1},
                        }
                },
                new Extension
                {
                    Point = "SidebarMenu",
                    Items =
                        new List<dynamic>()
                        {
                            new {url = "Flight/About?plugin=Flight", Text = "Quartz", Order = 2},
                        }
                }
            };
        }
    }
}
